<script>
var password = "rtmd";
myFunction();

function myFunction() {
   for(var i = 0;;i++) {
     console.log(password);
   }
  console.log(password);
}
</script>